package com.ms.content.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.transaction.annotation.Transactional;

/**
 * 
 * 
 * @author wc
 * @email sunlightcs@gmail.com
 * @date 2022-03-09 18:59:58
 */
@Data
@TableName("bargain_activity")
public class BargainActivityEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id = 0L;
	/**
	 * 商品id
	 */
	private Integer goodsId;
	/**
	 * 商品规格
	 */
	private String commercialSog;
	/**
	 * 开始时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date startTime;
	/**
	 * 结束时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date endTime;
	/**
	 * 商品原价
	 */
	private BigDecimal shopOriginalCost;
	/**
	 * 商品低价
	 */
	private BigDecimal shopCommodityPrice;
	/**
	 * 商品砍价规则
	 */
	private Integer shopBargainingRules;
	/**
	 * 活动分享描述
	 */
	private String activitiesText;


	/**
	 * 刀数
	 */
	private Integer kafinSunCount;
	/**
	 * 每刀最多可砍
	 */
	private BigDecimal kafinPrice;

	@TableField(exist = false) //不与数据库做映射
	private GoodsEntity goodsEntity;

}
